
package za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Bridge.Factory;

import za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Bridge.Model.BigBus;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Bridge.Model.SmallEngine;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Bridge.Model.Vechile;

public class VechileFactory 
{
    private static Vechile vechile = null;

    public static Vechile creteBigBus(SmallEngine smallEngine)
    {
        if(vechile == null)
            vechile = new BigBus(smallEngine);
        
        return vechile;
    }

    public static Vechile creteSmallCar(SmallEngine smallEngine) 
    {
         if(vechile == null)
            vechile = new SmallCar(smallEngine);
        
        return vechile;
    }
    
}
